perf(mobile): smooth workspace resume - #4760
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Needs human review 1 blocking correctness issue found. This PR introduces significant changes to mobile app startup timing, connection status UI behavior, and shell synchronization strategy. Combined with unresolved review comments identifying potential UI bugs (overlay obscuring content, async state timing issues), these changes warrant human review. You can customize Macroscope's approvability policy. Learn more. |
7e7f593 to
06c7cdc
Compare
There was a problem hiding this comment.
🟠 High
The persistent connection status overlay (WorkspaceConnectionStatusOverlay) floats above the bottom of the thread list, but the list's contentContainerStyle.paddingBottom is not increased to compensate. When an offline/error state persists and the user scrolls to the bottom, the last thread row or empty-state content remains partially obscured by the overlay and its tap target is unreachable. Add bottom clearance to the list content padding so the last row can scroll fully above the overlay.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx around line 1104:
The persistent connection status overlay (`WorkspaceConnectionStatusOverlay`) floats above the bottom of the thread list, but the list's `contentContainerStyle.paddingBottom` is not increased to compensate. When an offline/error state persists and the user scrolls to the bottom, the last thread row or empty-state content remains partially obscured by the overlay and its tap target is unreachable. Add bottom clearance to the list content padding so the last row can scroll fully above the overlay.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 06c7cdc. Configure here.
| return () => clearTimeout(timeout); | ||
| }, [presentation, presented]); | ||
|
|
||
| if (!presented) return null; |
There was a problem hiding this comment.
Overlay shows after status hidden
Medium Severity
The WorkspaceConnectionStatusOverlay's presented state, which controls its visibility, updates asynchronously in useEffect. This can cause the overlay to briefly appear when it should be hidden, or delay its appearance/disappearance, due to a mismatch with the immediate workspaceConnectionStatusPresentation state.
Reviewed by Cursor Bugbot for commit 06c7cdc. Configure here.
| state={props.catalogState} | ||
| onPress={props.onOpenEnvironments} | ||
| variant="sidebar" | ||
| /> |
There was a problem hiding this comment.
Empty state shows duplicate spinners
Low Severity
The empty-state ActivityIndicator no longer checks whether connection status is shown. During a deferred connecting load, the empty copy still spins and, after 350ms, WorkspaceConnectionStatusOverlay adds a second spinner for the same recovery state.
Reviewed by Cursor Bugbot for commit 06c7cdc. Configure here.


Problem
Reopening the mobile app could briefly reveal an incomplete workspace, reload a shell snapshot that was already cached, and insert temporary connection status into list layouts. Warm resumes therefore felt slower than necessary and could flash or shift content even when recovery was quick.
Fix
The connection supervisor is intentionally unchanged. Mobile foreground wakeups, probe timing, lease replacement, and retry behavior are owned by #4878 on
main.User impact
Warm app resumes retain useful workspace content, avoid a redundant snapshot request, and no longer move the interface when connection status appears or disappears.
Verification
@t3tools/client-runtimetypecheck@t3tools/mobiletypecheckChecklist
Note
Medium Risk
Touches mobile bootstrap timing, shell stream resumption semantics, and workspace connection UI; incorrect hydration or cursor resume could show stale data or flash wrong chrome, but connection supervisor behavior is intentionally unchanged.
Overview
Startup keeps the splash screen up until saved environment shell caches finish hydrating (or the catalog fails), capped at 750 ms, so the first frame can show cached threads instead of an empty shell.
Shell sync in
client-runtimeresumes WebSocket subscriptions from the cached snapshot sequence when the server supports completion markers, skipping redundant HTTP shell downloads on warm cache and app foreground. Cold caches and older servers still use the HTTP snapshot path.cacheHydrated/areShellCachesHydratedtrack per-environment cache reads for bootstrap gating.Connection status UI moves to a floating overlay (
WorkspaceConnectionStatusOverlay) on home and the thread sidebar so reconnect/sync banners do not push lists or empty states. Transient connecting/sync states are delayed 350 ms; offline and errors show immediately. Labels distinguish Connecting vs Reconnecting, and empty-state actions route to add environment or environment settings when appropriate.Reviewed by Cursor Bugbot for commit 06c7cdc. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Smooth mobile reconnect UI and resume shells from cached snapshots
WorkspaceConnectionStatusOverlayreplaces inline connection status in HomeScreen and ThreadNavigationSidebar, positioning the status banner as a floating overlay to avoid layout shifts.📊 Macroscope summarized 06c7cdc. 6 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted
🗂️ Filtered Issues
No issues evaluated.
Model: GPT-5.6 Sol
Harness: Codex in T3 Code